;;;
;;; JaCoLiB
;;; Copyright (C) 2008 Alessandro Serra
;;; 
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;; 
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;; 
;;; You should have received a copy of the GNU General Public License
;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
;;;

;;;; Created on 2008-07-02 09:32:38

(in-package :jacolib)

;
; Shell
;

(defclass shell ()
  ()
  (:documentation "A generic shell."))

; generic functions

(defgeneric shell-hello (shell)
  (:documentation ": shell -> string. Returs an hello string.")
  (:method ((shell shell))
    (format nil "Hello! I'm a ~A shell." (shell-language-name shell))))
(defgeneric shell-language-name (shell)
  (:documentation ": shell -> string. Returs an the language name that the shell is ablr to speak.")
  (:method ((shell shell))
    "unknow"))
(defgeneric shell-get (shell key)
  (:documentation ": shell, string -> object. Returns the value of the variable identified by the string key."))
(defgeneric shell-set (shell key obj)
  (:documentation ": shell, string, object -> nil. Set the value of the variable identified by the string key to the object."))
(defgeneric shell-unset (shell key)
  (:documentation ": shell, string -> nil. Unbounds the variable identified by the string key."))
(defgeneric shell-eval (shell code)
  (:documentation ": shell, string -> object. Returns the evaluation of the code."))
(defgeneric shell-source (shell filename)
  (:documentation ": shell, string -> nil. Loads and evaluates the file."))


